namespace ScrumSprintMonitor.Infrastructure
{
	#region #using Directives

	using System;
	using System.ComponentModel;
	using System.Diagnostics;

	#endregion

	public class BurndownDataPoint : INotifyPropertyChanged
	{
		private string team;
		private DateTime time;
		private double workDone;
		private double workRemaining;

		public DateTime Time
		{
			[DebuggerStepThrough]
			get { return this.time; }
			set
			{
				if (value == Time)
				{
					return;
				}

				this.time = value;

				OnPropertyChanged("Time");
			}
		}

		public string Team
		{
			[DebuggerStepThrough]
			get { return this.team; }
			set
			{
				if (value == Team)
				{
					return;
				}

				this.team = value;

				OnPropertyChanged("Team");
			}
		}

		public double WorkDone
		{
			[DebuggerStepThrough]
			get { return this.workDone; }
			set
			{
				if (value == WorkDone)
				{
					return;
				}

				this.workDone = value;

				OnPropertyChanged("WorkDone");
			}
		}

		public double WorkRemaining
		{
			[DebuggerStepThrough]
			get { return this.workRemaining; }
			set
			{
				if (value == WorkRemaining)
				{
					return;
				}

				this.workRemaining = value;

				OnPropertyChanged("WorkRemaining");
			}
		}

		#region INotifyPropertyChanged Members

		public event PropertyChangedEventHandler PropertyChanged;

		#endregion

		#region Implementation

		private void OnPropertyChanged(string propertyName)
		{
			if (PropertyChanged != null)
			{
				PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}

		#endregion
	}
}